﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using com.nm.Attributes;

namespace PlanAPI.model
{
    public class PLItemProcessModel
    {
        #region PLItemProcess实体(对应数据库的所有字段)
        /// <summary>
        /// PLItemProcess实体(对应数据库的所有字段)
        /// </summary>
        public class Entity
        {
            [ParamDescription("公司代码")]
            public string CompanyID { get; set; }

            [ParamDescription("年份")]
            public int Yearv { get; set; }


            [ParamDescription("月/周标记")]
            public int MonthOrWeek { get; set; }


            [ParamDescription("月份")]
            public int Monthv { get; set; }

            [ParamDescription("周")]
            public int Weekv { get; set; }


            [ParamDescription("全国/店铺")]
            public int AreaOrShop { get; set; }

            [ParamDescription("商品分区")]
            public string ParentAreaID { get; set; }

            [ParamDescription("店铺")]
            public string ShopID { get; set; }

            [ParamDescription("类别")]
            public string KindID { get; set; }

            [ParamDescription("系列")]
            public string SeriesID { get; set; }

            [ParamDescription("商品层")]
            public string MaterialProperty { get; set; }

            [ParamDescription("品类")]
            public string ModelID { get; set; }

            [ParamDescription("小品类")]
            public string ItemID { get; set; }

            [ParamDescription("配货金额")]
            public decimal MoveAmount { get; set; }

            [ParamDescription("配货金额占比")]
            public decimal MoveAmountRate { get; set; }

            [ParamDescription("供货金额")]
            public decimal SupplyAmount { get; set; }

            [ParamDescription("供货金额占比")]
            public decimal SupplyAmountRate { get; set; }

            [ParamDescription("销售金额")]
            public decimal SaleAmount { get; set; }

            [ParamDescription("销售金额占比")]
            public decimal SaleAmountRate { get; set; }

            [ParamDescription("配销比")]
            public decimal MSRate { get; set; }

            [ParamDescription("平均配销比")]
            public decimal AvgMSRate { get; set; }

            [ParamDescription("标准金额占比")]
            public decimal StandAmountRate { get; set; }

            [ParamDescription("换算百分比")]
            public decimal CalcStandAmountRate { get; set; }

            [ParamDescription("即自动取值")]
            public decimal PtStandAmountRate { get; set; }

            [ParamDescription("周更新率")]
            public decimal UpdateRate { get; set; }

            [ParamDescription("周更新率(换算)")]
            public decimal PtUpdateRate { get; set; }


            [ParamDescription("标准金额百分比")]
            public decimal AutoStandAmountRate { get; set; }

            [ParamDescription("确认标准金额百分比")]
            public decimal CkPtStandAmountRate { get; set; }

            [ParamDescription("校对计算值")]
            public decimal CalcCheck { get; set; }

            [ParamDescription("备注")]
            public string Remark { get; set; }

            [ParamDescription("审核状态")]
            public int CheckState { get; set; }

            [ParamDescription("审核人")]
            public string Checker { get; set; }

            [ParamDescription("修改时间")]
            public DateTime MofifyDTM { get; set; }

            [ParamDescription("新增记录标记")]
            public int AddFlag { get; set; }

            [ParamDescription("抽数时间")]
            public DateTime LoadTime { get; set; }

            [ParamDescription("修改时间")]
            public DateTime EtlDate { get; set; }

        }
        #endregion


        #region 区域-月

        public class AreaMonth
        {
            public class ListModel
            {
                [ParamDescription("公司代码")]
                public string CompanyID { get; set; }

                [ParamDescription("年份")]
                public int Yearv { get; set; }

                [ParamDescription("月/周标记")]
                public int MonthOrWeek { get; set; }

                [ParamDescription("月份")]
                public int Monthv { get; set; }

                [ParamDescription("周")]
                public int Weekv { get; set; }

                [ParamDescription("全国/店铺")]
                public int AreaOrShop { get; set; }

                [ParamDescription("商品分区")]
                public string ParentAreaID { get; set; }

                [ParamDescription("店铺")]
                public string ShopID { get; set; }

                [ParamDescription("类别")]
                public string KindID { get; set; }

                [ParamDescription("系列")]
                public string SeriesID { get; set; }

                [ParamDescription("商品层")]
                public string MaterialProperty { get; set; }

                [ParamDescription("品类")]
                public string ModelID { get; set; }

                [ParamDescription("小品类")]
                public string ItemID { get; set; }

                [ParamDescription("配货金额")]
                public decimal MoveAmount { get; set; }

                [ParamDescription("配货金额占比")]
                public decimal MoveAmountRate { get; set; }

                [ParamDescription("供货金额")]
                public decimal SupplyAmount { get; set; }

                [ParamDescription("供货金额占比")]
                public decimal SupplyAmountRate { get; set; }

                [ParamDescription("销售金额")]
                public decimal SaleAmount { get; set; }

                [ParamDescription("销售金额占比")]
                public decimal SaleAmountRate { get; set; }

                [ParamDescription("配销比")]
                public decimal MSRate { get; set; }

                [ParamDescription("平均配销比")]
                public decimal AvgMSRate { get; set; }

                [ParamDescription("标准金额占比")]
                public decimal StandAmountRate { get; set; }

                [ParamDescription("换算百分比")]
                public decimal CalcStandAmountRate { get; set; }

                [ParamDescription("即自动取值")]
                public decimal PtStandAmountRate { get; set; }

                [ParamDescription("周更新率")]
                public decimal UpdateRate { get; set; }

                [ParamDescription("周更新率(换算)")]
                public decimal PtUpdateRate { get; set; }

                [ParamDescription("标准金额百分比")]
                public decimal AutoStandAmountRate { get; set; }

                [ParamDescription("确认标准金额百分比")]
                public decimal CkPtStandAmountRate { get; set; }

                [ParamDescription("校对计算值")]
                public decimal CalcCheck { get; set; }

                [ParamDescription("类型")]
                public string KindName { get; set; }

                [ParamDescription("系列")]
                public string SeriesName { get; set; }

                [ParamDescription("品类")]
                public string ModelName { get; set; }

                [ParamDescription("小品类")]
                public string ItemName { get; set; }

                /// <summary>
                /// 浮动区间(区间20%)左边
                /// </summary>
                public decimal FloatAreaLeft { get; set; }

                /// <summary>
                /// 浮动区间(区间20%)右边
                /// </summary>
                public decimal FloatAreaRight { get; set; }

            }

            public class UpdateModelList
            {
                public IList<UpdateModel> List { get; set; }
            }

            public class UpdateModel: BaseUpdateModel
            {
                [ParamDescription("周")]
                public int Weekv { get; set; }

                [ParamDescription("店铺")]
                public string ShopID { get; set; }

                [ParamDescription("配货金额")]
                public decimal MoveAmount { get; set; }

                [ParamDescription("配货金额占比")]
                public decimal MoveAmountRate { get; set; }

                [ParamDescription("供货金额")]
                public decimal SupplyAmount { get; set; }

                [ParamDescription("供货金额占比")]
                public decimal SupplyAmountRate { get; set; }

                [ParamDescription("销售金额")]
                public decimal SaleAmount { get; set; }

                [ParamDescription("销售金额占比")]
                public decimal SaleAmountRate { get; set; }

                [ParamDescription("配销比")]
                public decimal MSRate { get; set; }

                [ParamDescription("平均配销比")]
                public decimal AvgMSRate { get; set; }

                [ParamDescription("标准金额占比")]
                public decimal StandAmountRate { get; set; }

                [ParamDescription("换算百分比")]
                public decimal CalcStandAmountRate { get; set; }

                [ParamDescription("即自动取值")]
                public decimal PtStandAmountRate { get; set; }

                [ParamDescription("周更新率")]
                public decimal UpdateRate { get; set; }

                [ParamDescription("周更新率(换算)")]
                public decimal PtUpdateRate { get; set; }


                [ParamDescription("标准金额百分比")]
                public decimal AutoStandAmountRate { get; set; }

                [ParamDescription("确认标准金额百分比")]
                public decimal CkPtStandAmountRate { get; set; }

                [ParamDescription("校对计算值")]
                public decimal CalcCheck { get; set; }

                [ParamDescription("备注")]
                public string Remark { get; set; }

                [ParamDescription("审核状态")]
                public int CheckState { get; set; }

                [ParamDescription("审核人")]
                public string Checker { get; set; }

                [ParamDescription("修改时间")]
                public DateTime MofifyDTM { get; set; }

                [ParamDescription("新增记录标记")]
                public int AddFlag { get; set; }

                [ParamDescription("抽数时间")]
                public DateTime LoadTime { get; set; }

                [ParamDescription("修改时间")]
                public DateTime EtlDate { get; set; }

            }

            public class ListModelInfo
            {
                public ListModelInfo()
                {
                    List = new List<ItemGroup>();
                }

                /// <summary>
                /// 年
                /// </summary>
                public int Yearv { get; set; }

                /// <summary>
                /// 月
                /// </summary>
                public int Monthv { get; set; }

                /// <summary>
                /// 商品区域
                /// </summary>
                public string ParentAreaID { get; set; }



                /// <summary>
                /// 类型
                /// </summary>
                public string KindID { get; set; }

                /// <summary>
                /// 系列
                /// </summary>
                public string SeriesID { get; set; }

                [ParamDescription("商品层")]
                public string MaterialProperty { get; set; }

                /// <summary>
                /// 品类
                /// </summary>
                public string ModelID { get; set; }

                ///// <summary>
                /// 类别
                /// </summary>
                public string KindName { get; set; }

                /// <summary>
                /// 系列
                /// </summary>
                public string SeriesName { get; set; }

                /// <summary>
                /// 数据集
                /// </summary>
                public List<ItemGroup> List { get; set; }

            }
            public class ItemGroup
            {
                public ItemGroup()
                {
                    ItemList = new List<ListModel>();
                }

                public ItemGroup(string itemId)
                {
                    ItemList = new List<ListModel>();
                    ItemID = itemId;
                }

                public string ItemID { get; set; }
                /// <summary>
                /// 数据集
                /// </summary>

                public List<ListModel> ItemList { get; set; }

            }
        }

        #endregion


        #region 区域-周

        public class AreaWeek
        {
            public class ListModel
            {
                [ParamDescription("公司代码")]
                public string CompanyID { get; set; }

                [ParamDescription("年份")]
                public int Yearv { get; set; }


                [ParamDescription("月/周标记")]
                public int MonthOrWeek { get; set; }


                [ParamDescription("月份")]
                public int Monthv { get; set; }

                [ParamDescription("周")]
                public int Weekv { get; set; }


                [ParamDescription("全国/店铺")]
                public int AreaOrShop { get; set; }

                [ParamDescription("商品分区")]
                public string ParentAreaID { get; set; }

                [ParamDescription("店铺")]
                public string ShopID { get; set; }

                [ParamDescription("类别")]
                public string KindID { get; set; }

                [ParamDescription("系列")]
                public string SeriesID { get; set; }

                [ParamDescription("商品层")]
                public string MaterialProperty { get; set; }

                [ParamDescription("品类")]
                public string ModelID { get; set; }

                [ParamDescription("小品类")]
                public string ItemID { get; set; }

                [ParamDescription("配货金额")]
                public decimal MoveAmount { get; set; }

                [ParamDescription("配货金额占比")]
                public decimal MoveAmountRate { get; set; }

                [ParamDescription("供货金额")]
                public decimal SupplyAmount { get; set; }

                [ParamDescription("供货金额占比")]
                public decimal SupplyAmountRate { get; set; }

                [ParamDescription("销售金额")]
                public decimal SaleAmount { get; set; }

                [ParamDescription("销售金额占比")]
                public decimal SaleAmountRate { get; set; }

                [ParamDescription("配销比")]
                public decimal MSRate { get; set; }

                [ParamDescription("平均配销比")]
                public decimal AvgMSRate { get; set; }

                [ParamDescription("标准金额占比")]
                public decimal StandAmountRate { get; set; }

                [ParamDescription("换算百分比")]
                public decimal CalcStandAmountRate { get; set; }

                [ParamDescription("即自动取值")]
                public decimal PtStandAmountRate { get; set; }

                [ParamDescription("周更新率")]
                public decimal UpdateRate { get; set; }

                [ParamDescription("周更新率(换算)")]
                public decimal PtUpdateRate { get; set; }


                [ParamDescription("标准金额百分比")]
                public decimal AutoStandAmountRate { get; set; }

                [ParamDescription("确认标准金额百分比")]
                public decimal CkPtStandAmountRate { get; set; }

                [ParamDescription("校对计算值")]
                public decimal CalcCheck { get; set; }

                //[ParamDescription("备注")]
                //public string Remark { get; set; }

                //[ParamDescription("审核状态")]
                //public int CheckState { get; set; }

                //[ParamDescription("审核人")]
                //public string Checker { get; set; }

                //[ParamDescription("修改时间")]
                //public DateTime MofifyDTM { get; set; }

                //[ParamDescription("新增记录标记")]
                //public int AddFlag { get; set; }

                //[ParamDescription("抽数时间")]
                //public DateTime LoadTime { get; set; }

                //[ParamDescription("修改时间")]
                //public DateTime EtlDate { get; set; }

                [ParamDescription("类型")]
                public string KindName { get; set; }

                [ParamDescription("系列")]
                public string SeriesName { get; set; }

                [ParamDescription("品类")]
                public string ModelName { get; set; }

                [ParamDescription("小品类")]
                public string ItemName { get; set; }

                /// <summary>
                /// 单店-月确认值（用于数据验证）
                /// </summary>
                public decimal AreaMonth_CkPtStandAmountRate { get; set; }

                /// <summary>
                /// 标准金额占比
                /// </summary>
                public decimal StandardAmountPercentage { get; set; }

                /// <summary>
                /// 浮动区间(区间20%)左边
                /// </summary>
                public decimal FloatAreaLeft { get; set; }

                /// <summary>
                /// 浮动区间(区间20%)右边
                /// </summary>
                public decimal FloatAreaRight { get; set; }
            }

            public class UpdateModelList
            {
                public IList<UpdateModel> List { get; set; }
            }

            public class UpdateModel : BaseUpdateModel
            {

                [ParamDescription("周")]
                public int Weekv { get; set; }

                [ParamDescription("店铺")]
                public string ShopID { get; set; }

                [ParamDescription("配货金额")]
                public decimal MoveAmount { get; set; }

                [ParamDescription("配货金额占比")]
                public decimal MoveAmountRate { get; set; }

                [ParamDescription("供货金额")]
                public decimal SupplyAmount { get; set; }

                [ParamDescription("供货金额占比")]
                public decimal SupplyAmountRate { get; set; }

                [ParamDescription("销售金额")]
                public decimal SaleAmount { get; set; }

                [ParamDescription("销售金额占比")]
                public decimal SaleAmountRate { get; set; }

                [ParamDescription("配销比")]
                public decimal MSRate { get; set; }

                [ParamDescription("平均配销比")]
                public decimal AvgMSRate { get; set; }

                [ParamDescription("标准金额占比")]
                public decimal StandAmountRate { get; set; }

                [ParamDescription("换算百分比")]
                public decimal CalcStandAmountRate { get; set; }

                [ParamDescription("即自动取值")]
                public decimal PtStandAmountRate { get; set; }

                [ParamDescription("周更新率")]
                public decimal UpdateRate { get; set; }

                [ParamDescription("周更新率(换算)")]
                public decimal PtUpdateRate { get; set; }


                [ParamDescription("标准金额百分比")]
                public decimal AutoStandAmountRate { get; set; }

                [ParamDescription("确认标准金额百分比")]
                public decimal CkPtStandAmountRate { get; set; }

                [ParamDescription("校对计算值")]
                public decimal CalcCheck { get; set; }

                public decimal OldCkPtStandAmountRate { get; set; }

                //[ParamDescription("备注")]
                //public string Remark { get; set; }

                //[ParamDescription("审核状态")]
                //public int CheckState { get; set; }

                //[ParamDescription("审核人")]
                //public string Checker { get; set; }

                //[ParamDescription("修改时间")]
                //public DateTime MofifyDTM { get; set; }

                //[ParamDescription("新增记录标记")]
                //public int AddFlag { get; set; }

                //[ParamDescription("抽数时间")]
                //public DateTime LoadTime { get; set; }

                //[ParamDescription("修改时间")]
                //public DateTime EtlDate { get; set; }
            }

            public class ListModelInfo
            {
                public ListModelInfo()
                {
                    List = new List<WeekGroup>();
                }

                /// <summary>
                /// 年
                /// </summary>
                public int Yearv { get; set; }

                /// <summary>
                /// 月
                /// </summary>
                public int Monthv { get; set; }

                /// <summary>
                /// 商品区域
                /// </summary>
                public string ParentAreaID { get; set; }



                /// <summary>
                /// 类型
                /// </summary>
                public string KindID { get; set; }

                /// <summary>
                /// 系列
                /// </summary>
                public string SeriesID { get; set; }

                [ParamDescription("商品层")]
                public string MaterialProperty { get; set; }

                /// <summary>
                /// 品类
                /// </summary>
                public string ModelID { get; set; }




                ///// <summary>
                ///// 类别
                ///// </summary>
                //public string KindName { get; set; }

                ///// <summary>
                ///// 系列
                ///// </summary>
                //public string SeriesName { get; set; }

                ///// <summary>
                ///// 上一步的确认值
                ///// </summary>
                //public decimal OldCkPtStandAmountRate { get; set; }

                /// <summary>
                /// 数据集
                /// </summary>
                public List<WeekGroup> List { get; set; }

            }

            public class WeekGroup
            {
                public WeekGroup()
                {
                    WeekList = new List<ListModel>();
                }

                public WeekGroup(int week)
                {
                    WeekList = new List<ListModel>();
                    Weekv = week;
                }

                public int Weekv { get; set; }
                /// <summary>
                /// 数据集
                /// </summary>

                public List<ListModel> WeekList { get; set; }

            }
        }

        #endregion


        #region 单店-月

        public class ShopMonth
        {
            public class ListModel
            {
                [ParamDescription("公司代码")]
                public string CompanyID { get; set; }

                [ParamDescription("年份")]
                public int Yearv { get; set; }


                [ParamDescription("月/周标记")]
                public int MonthOrWeek { get; set; }


                [ParamDescription("月份")]
                public int Monthv { get; set; }

                [ParamDescription("周")]
                public int Weekv { get; set; }


                [ParamDescription("全国/店铺")]
                public int AreaOrShop { get; set; }

                [ParamDescription("商品分区")]
                public string ParentAreaID { get; set; }

                [ParamDescription("店铺")]
                public string ShopID { get; set; }

                [ParamDescription("类别")]
                public string KindID { get; set; }

                [ParamDescription("系列")]
                public string SeriesID { get; set; }

                [ParamDescription("商品层")]
                public string MaterialProperty { get; set; }

                [ParamDescription("品类")]
                public string ModelID { get; set; }

                [ParamDescription("小品类")]
                public string ItemID { get; set; }

                [ParamDescription("配货金额")]
                public decimal MoveAmount { get; set; }

                [ParamDescription("配货金额占比")]
                public decimal MoveAmountRate { get; set; }

                [ParamDescription("供货金额")]
                public decimal SupplyAmount { get; set; }

                [ParamDescription("供货金额占比")]
                public decimal SupplyAmountRate { get; set; }

                [ParamDescription("销售金额")]
                public decimal SaleAmount { get; set; }

                [ParamDescription("销售金额占比")]
                public decimal SaleAmountRate { get; set; }

                [ParamDescription("配销比")]
                public decimal MSRate { get; set; }

                [ParamDescription("平均配销比")]
                public decimal AvgMSRate { get; set; }

                [ParamDescription("标准金额占比")]
                public decimal StandAmountRate { get; set; }

                [ParamDescription("换算百分比")]
                public decimal CalcStandAmountRate { get; set; }

                [ParamDescription("即自动取值")]
                public decimal PtStandAmountRate { get; set; }

                [ParamDescription("周更新率")]
                public decimal UpdateRate { get; set; }

                [ParamDescription("周更新率(换算)")]
                public decimal PtUpdateRate { get; set; }


                [ParamDescription("标准金额百分比")]
                public decimal AutoStandAmountRate { get; set; }

                [ParamDescription("确认标准金额百分比")]
                public decimal CkPtStandAmountRate { get; set; }

                [ParamDescription("校对计算值")]
                public decimal CalcCheck { get; set; }

                //[ParamDescription("备注")]
                //public string Remark { get; set; }

                //[ParamDescription("审核状态")]
                //public int CheckState { get; set; }

                //[ParamDescription("审核人")]
                //public string Checker { get; set; }

                //[ParamDescription("修改时间")]
                //public DateTime MofifyDTM { get; set; }

                //[ParamDescription("新增记录标记")]
                //public int AddFlag { get; set; }

                //[ParamDescription("抽数时间")]
                //public DateTime LoadTime { get; set; }

                //[ParamDescription("修改时间")]
                //public DateTime EtlDate { get; set; }

                [ParamDescription("类型")]
                public string KindName { get; set; }

                [ParamDescription("系列")]
                public string SeriesName { get; set; }

                [ParamDescription("品类")]
                public string ModelName { get; set; }

                [ParamDescription("店铺名称")]
                public string ShopName { get; set; }

                [ParamDescription("小品类")]
                public string ItemName { get; set; }

                public decimal AreaMonth_CkPtStandAmountRate { get; set; }

                /// <summary>
                /// 浮动区间(区间20%)左边
                /// </summary>
                public decimal FloatAreaLeft { get; set; }

                /// <summary>
                /// 浮动区间(区间20%)右边
                /// </summary>
                public decimal FloatAreaRight { get; set; }
            }

            public class UpdateModelList
            {
                public IList<UpdateModel> List { get; set; }
            }

            public class UpdateModel : BaseUpdateModel
            {
                [ParamDescription("周")]
                public int Weekv { get; set; }

                [ParamDescription("店铺")]
                public string ShopID { get; set; }

                [ParamDescription("配货金额")]
                public decimal MoveAmount { get; set; }

                [ParamDescription("配货金额占比")]
                public decimal MoveAmountRate { get; set; }

                [ParamDescription("供货金额")]
                public decimal SupplyAmount { get; set; }

                [ParamDescription("供货金额占比")]
                public decimal SupplyAmountRate { get; set; }

                [ParamDescription("销售金额")]
                public decimal SaleAmount { get; set; }

                [ParamDescription("销售金额占比")]
                public decimal SaleAmountRate { get; set; }

                [ParamDescription("配销比")]
                public decimal MSRate { get; set; }

                [ParamDescription("平均配销比")]
                public decimal AvgMSRate { get; set; }

                [ParamDescription("标准金额占比")]
                public decimal StandAmountRate { get; set; }

                [ParamDescription("换算百分比")]
                public decimal CalcStandAmountRate { get; set; }

                [ParamDescription("即自动取值")]
                public decimal PtStandAmountRate { get; set; }

                [ParamDescription("周更新率")]
                public decimal UpdateRate { get; set; }

                [ParamDescription("周更新率(换算)")]
                public decimal PtUpdateRate { get; set; }


                [ParamDescription("标准金额百分比")]
                public decimal AutoStandAmountRate { get; set; }

                [ParamDescription("确认标准金额百分比")]
                public decimal CkPtStandAmountRate { get; set; }

                [ParamDescription("校对计算值")]
                public decimal CalcCheck { get; set; }

                //[ParamDescription("备注")]
                //public string Remark { get; set; }

                //[ParamDescription("审核状态")]
                //public int CheckState { get; set; }

                //[ParamDescription("审核人")]
                //public string Checker { get; set; }

                //[ParamDescription("修改时间")]
                //public DateTime MofifyDTM { get; set; }

                //[ParamDescription("新增记录标记")]
                //public int AddFlag { get; set; }

                //[ParamDescription("抽数时间")]
                //public DateTime LoadTime { get; set; }

                //[ParamDescription("修改时间")]
                //public DateTime EtlDate { get; set; }
            }

            public class ListModelInfo
            {
                public ListModelInfo()
                {
                    List = new List<ItemGroup>();
                }

                /// <summary>
                /// 年
                /// </summary>
                public int Yearv { get; set; }

                /// <summary>
                /// 月
                /// </summary>
                public int Monthv { get; set; }

                /// <summary>
                /// 商品区域
                /// </summary>
                public string ParentAreaID { get; set; }



                /// <summary>
                /// 类型
                /// </summary>
                public string KindID { get; set; }

                /// <summary>
                /// 系列
                /// </summary>
                public string SeriesID { get; set; }

                [ParamDescription("商品层")]
                public string MaterialProperty { get; set; }

                /// <summary>
                /// 品类
                /// </summary>
                public string ModelID { get; set; }




                ///// <summary>
                ///// 类别
                ///// </summary>
                //public string KindName { get; set; }

                ///// <summary>
                ///// 系列
                ///// </summary>
                //public string SeriesName { get; set; }

                ///// <summary>
                ///// 上一步的确认值
                ///// </summary>
                //public decimal OldCkPtStandAmountRate { get; set; }

                /// <summary>
                /// 数据集
                /// </summary>
                public List<ItemGroup> List { get; set; }

            }

            public class ItemGroup
            {
                public ItemGroup()
                {
                    ItemList = new List<ListModel>();
                }

                public ItemGroup(string itemId)
                {
                    ItemList = new List<ListModel>();
                    ItemID = itemId;
                }

                public string ItemID { get; set; }
                /// <summary>
                /// 数据集
                /// </summary>

                public List<ListModel> ItemList { get; set; }

            }
        }

        #endregion


        #region 单店-周

        public class ShopWeek
        {
            public class ListModel
            {
                [ParamDescription("公司代码")]
                public string CompanyID { get; set; }

                [ParamDescription("年份")]
                public int Yearv { get; set; }


                [ParamDescription("月/周标记")]
                public int MonthOrWeek { get; set; }


                [ParamDescription("月份")]
                public int Monthv { get; set; }

                [ParamDescription("周")]
                public int Weekv { get; set; }


                [ParamDescription("全国/店铺")]
                public int AreaOrShop { get; set; }

                [ParamDescription("商品分区")]
                public string ParentAreaID { get; set; }

                [ParamDescription("店铺")]
                public string ShopID { get; set; }

                [ParamDescription("类别")]
                public string KindID { get; set; }

                [ParamDescription("系列")]
                public string SeriesID { get; set; }

                [ParamDescription("商品层")]
                public string MaterialProperty { get; set; }

                [ParamDescription("品类")]
                public string ModelID { get; set; }

                [ParamDescription("小品类")]
                public string ItemID { get; set; }

                [ParamDescription("配货金额")]
                public decimal MoveAmount { get; set; }

                [ParamDescription("配货金额占比")]
                public decimal MoveAmountRate { get; set; }

                [ParamDescription("供货金额")]
                public decimal SupplyAmount { get; set; }

                [ParamDescription("供货金额占比")]
                public decimal SupplyAmountRate { get; set; }

                [ParamDescription("销售金额")]
                public decimal SaleAmount { get; set; }

                [ParamDescription("销售金额占比")]
                public decimal SaleAmountRate { get; set; }

                [ParamDescription("配销比")]
                public decimal MSRate { get; set; }

                [ParamDescription("平均配销比")]
                public decimal AvgMSRate { get; set; }

                [ParamDescription("标准金额占比")]
                public decimal StandAmountRate { get; set; }

                [ParamDescription("换算百分比")]
                public decimal CalcStandAmountRate { get; set; }

                [ParamDescription("即自动取值")]
                public decimal PtStandAmountRate { get; set; }

                [ParamDescription("周更新率")]
                public decimal UpdateRate { get; set; }

                [ParamDescription("周更新率(换算)")]
                public decimal PtUpdateRate { get; set; }


                [ParamDescription("标准金额百分比")]
                public decimal AutoStandAmountRate { get; set; }

                [ParamDescription("确认标准金额百分比")]
                public decimal CkPtStandAmountRate { get; set; }

                [ParamDescription("校对计算值")]
                public decimal CalcCheck { get; set; }

                //[ParamDescription("备注")]
                //public string Remark { get; set; }

                //[ParamDescription("审核状态")]
                //public int CheckState { get; set; }

                //[ParamDescription("审核人")]
                //public string Checker { get; set; }

                //[ParamDescription("修改时间")]
                //public DateTime MofifyDTM { get; set; }

                //[ParamDescription("新增记录标记")]
                //public int AddFlag { get; set; }

                //[ParamDescription("抽数时间")]
                //public DateTime LoadTime { get; set; }

                //[ParamDescription("修改时间")]
                //public DateTime EtlDate { get; set; }

                [ParamDescription("类型")]
                public string KindName { get; set; }

                [ParamDescription("系列")]
                public string SeriesName { get; set; }

                [ParamDescription("品类")]
                public string ModelName { get; set; }

                [ParamDescription("店铺名称")]
                public string ShopName { get; set; }

                [ParamDescription("小品类")]
                public string ItemName { get; set; }


                public decimal AreaWeek_PtStandAmountRate { get; set; }

                public decimal ShopMonth_CkPtStandAmountRate { get; set; }

                /// <summary>
                /// 浮动区间(区间20%)左边
                /// </summary>
                public decimal FloatAreaLeft { get; set; }

                /// <summary>
                /// 浮动区间(区间20%)右边
                /// </summary>
                public decimal FloatAreaRight { get; set; }


                /// <summary>
                /// 浮动区间(区间20%)左边
                /// </summary>
                public decimal FloatAreaLeft2 { get; set; }

                /// <summary>
                /// 浮动区间(区间20%)右边
                /// </summary>
                public decimal FloatAreaRight2 { get; set; }
            }

            public class UpdateModelList
            {
                public IList<UpdateModel> List { get; set; }
            }

            public class UpdateModel : BaseUpdateModel
            {
                [ParamDescription("周")]
                public int Weekv { get; set; }

                [ParamDescription("店铺")]
                public string ShopID { get; set; }

                [ParamDescription("配货金额")]
                public decimal MoveAmount { get; set; }

                [ParamDescription("配货金额占比")]
                public decimal MoveAmountRate { get; set; }

                [ParamDescription("供货金额")]
                public decimal SupplyAmount { get; set; }

                [ParamDescription("供货金额占比")]
                public decimal SupplyAmountRate { get; set; }

                [ParamDescription("销售金额")]
                public decimal SaleAmount { get; set; }

                [ParamDescription("销售金额占比")]
                public decimal SaleAmountRate { get; set; }

                [ParamDescription("配销比")]
                public decimal MSRate { get; set; }

                [ParamDescription("平均配销比")]
                public decimal AvgMSRate { get; set; }

                [ParamDescription("标准金额占比")]
                public decimal StandAmountRate { get; set; }

                [ParamDescription("换算百分比")]
                public decimal CalcStandAmountRate { get; set; }

                [ParamDescription("即自动取值")]
                public decimal PtStandAmountRate { get; set; }

                //[ParamDescription("周更新率")]
                //public decimal UpdateRate { get; set; }

                //[ParamDescription("周更新率(换算)")]
                //public decimal PtUpdateRate { get; set; }


                [ParamDescription("标准金额百分比")]
                public decimal AutoStandAmountRate { get; set; }

                [ParamDescription("确认标准金额百分比")]
                public decimal CkPtStandAmountRate { get; set; }

                [ParamDescription("校对计算值")]
                public decimal CalcCheck { get; set; }

                [ParamDescription("备注")]
                public string Remark { get; set; }

                [ParamDescription("审核状态")]
                public int CheckState { get; set; }

                [ParamDescription("审核人")]
                public string Checker { get; set; }

                [ParamDescription("修改时间")]
                public DateTime MofifyDTM { get; set; }

                [ParamDescription("新增记录标记")]
                public int AddFlag { get; set; }

                [ParamDescription("抽数时间")]
                public DateTime LoadTime { get; set; }

                [ParamDescription("修改时间")]
                public DateTime EtlDate { get; set; }

                public decimal OldCkPtStandAmountRate { get; set; }
            }

            public class ListModelInfo
            {
                public ListModelInfo()
                {
                    List = new List<WeekGroup>();
                }

                /// <summary>
                /// 年
                /// </summary>
                public int Yearv { get; set; }

                /// <summary>
                /// 月
                /// </summary>
                public int Monthv { get; set; }

                /// <summary>
                /// 商品区域
                /// </summary>
                public string ParentAreaID { get; set; }



                /// <summary>
                /// 类型
                /// </summary>
                public string KindID { get; set; }

                /// <summary>
                /// 系列
                /// </summary>
                public string SeriesID { get; set; }

                [ParamDescription("商品层")]
                public string MaterialProperty { get; set; }

                /// <summary>
                /// 品类
                /// </summary>
                public string ModelID { get; set; }




                ///// <summary>
                ///// 类别
                ///// </summary>
                //public string KindName { get; set; }

                ///// <summary>
                ///// 系列
                ///// </summary>
                //public string SeriesName { get; set; }

                ///// <summary>
                ///// 上一步的确认值
                ///// </summary>
                //public decimal OldCkPtStandAmountRate { get; set; }

                /// <summary>
                /// 数据集
                /// </summary>
                public List<WeekGroup> List { get; set; }

            }

            public class WeekGroup
            {
                public WeekGroup()
                {
                    WeekList = new List<ListModel>();
                }

                public WeekGroup(int week)
                {
                    WeekList = new List<ListModel>();
                    Weekv = week;
                }

                public int Weekv { get; set; }
                /// <summary>
                /// 数据集
                /// </summary>

                public List<ListModel> WeekList { get; set; }

            }
        }

        #endregion


        public class GroupModel
        {
            [ParamDescription("公司代码")]
            public string CompanyID { get; set; }

            [ParamDescription("年份")]
            public int Yearv { get; set; }


            [ParamDescription("月份")]
            public int Monthv { get; set; }


            [ParamDescription("商品分区")]
            public string ParentAreaID { get; set; }


            [ParamDescription("类别ID")]
            public string KindID { get; set; }


            [ParamDescription("系列ID")]
            public string SeriesID { get; set; }


            //[ParamDescription("星期")]
            //public int Weekv { get; set; }


            [ParamDescription("店铺ID")]
            public string ShopID { get; set; }

            [ParamDescription("品类")]
            public string ModelID { get; set; }

            [ParamDescription("商品层")]
            public string MaterialProperty { get; set; }

            [ParamDescription("月-周")]
            public int MonthOrWeek { get; set; }

            [ParamDescription("区域-单店")]
            public int AreaOrShop { get; set; }


        }

        public class BaseUpdateModel
        {
            [ParamDescription("公司代码")]
            public string CompanyID { get; set; }

            [ParamDescription("年份")]
            public int Yearv { get; set; }

            [ParamDescription("月/周标记")]
            public int MonthOrWeek { get; set; }

            [ParamDescription("月份")]
            public int Monthv { get; set; }

            [ParamDescription("全国/店铺")]
            public int AreaOrShop { get; set; }

            [ParamDescription("商品分区")]
            public string ParentAreaID { get; set; }

            [ParamDescription("类别")]
            public string KindID { get; set; }

            [ParamDescription("系列")]
            public string SeriesID { get; set; }

            [ParamDescription("商品层")]
            public string MaterialProperty { get; set; }

            [ParamDescription("品类")]
            public string ModelID { get; set; }

            [ParamDescription("小品类")]
            public string ItemID { get; set; }

        }
    }
}
